<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
	<title>Selezione Escursioni</title>
	<link rel="stylesheet" type="text/css" href="../styles/style.css" />
</h:head>
<h:body>
<div id="container">
<div id="box">

<header class="banner">
<span id="titoloPagina"> Scegli le esperienze da vivere nel Sogno </span>
</header>

<div id="externalborder1">
<p:spacer height="40px" />

 <h:form id="form"> 
      
      <p:growl id="growl" showDetail="true" sticky="true" />
      
	<div id="externalborderTab"> 
	
		<p:dataTable id="escursioniSelection" var="istanzaDTO" rowKey="#{istanzaDTO.idIstanza}" value="#{creaViaggio.escursioniDB}" paginator="true" rows="7"
                 selection="#{creaViaggio.istanzaTmp}" selectionMode="single" sortMode="multiple" style="text-align:center;" >  
  
   		
			<p:ajax event="rowSelect" update=":form:growl" listener="#{creaViaggio.onRowSelectEscursioni}"/>
		
			<p:column id="nome" sortBy="elemento.nome" headerText="Nome">  
	            <h:outputText value="#{istanzaDTO.elemento.nome}" />  
	        </p:column> 
	        
	         <p:column headerText="Citta">  
	            <h:outputText value="#{istanzaDTO.elemento.città}" />  
	        </p:column>
	        
	        <p:column headerText="Tipologia">  
	            <h:outputText value="#{istanzaDTO.elemento.multy}" />  
	        </p:column> 
	        
	         <p:column id="dataInizio" sortBy="dataInizio" headerText="DataInizio">  
	            <h:outputText value="#{istanzaDTO.dataInizio}">  
                <f:convertDateTime pattern="dd/MM/yyyy HH:mm" />    
            </h:outputText>    
	        </p:column> 
  
	        <p:column id="dataFine" sortBy="dataFine" headerText="DataFine">  
	            <h:outputText value="#{istanzaDTO.dataFine}" >  
                <f:convertDateTime pattern="dd/MM/yyyy HH:mm" />   
            </h:outputText>    
	        </p:column>  
	  
	        <p:column headerText="Descrizione">  
	            <h:outputText value="#{istanzaDTO.elemento.descrizione}" />  
	        </p:column> 
	        
	  
	        <p:column id="disponibilita" sortBy="disponibilita" headerText="Posti Disponibili">  
	            <h:outputText value="#{istanzaDTO.disponibilita}" />  
	        </p:column>  
	           
	        <p:column id="prezzo" sortBy="prezzo" headerText="Prezzo (a persona)">  
	            <h:outputText value="#{istanzaDTO.prezzo}" />  
	        </p:column>
	        
	    </p:dataTable>
    </div>
    </h:form>
    <p:spacer height="40px"></p:spacer>
    
 	<h:form>
 	
 	 	<div id="columnBox" style="margin:0px auto; width:70%">
	
	<div id="column1" style="float:left; margin:0; width:33%;">
		<div id="registerButton">
<h:commandLink id="registerlink" action="#{creaViaggio.getIstanzeHotelInPacchetto}">
<div class="button" id="indietro">
Indietro
</div>
</h:commandLink>
</div>
</div>

<div id="column2" style="float:left; margin:0;width:33%;">
	<div id="registerButton">
<h:commandLink id="loginlink" action="#{creaViaggio.getAllCittaVolo()}">
<div class="button" id="register">
Aggiungi Volo
</div>
</h:commandLink>
</div>
</div>

<div id="column3" style="float:left; margin:0;width:33%;">
	<div id="registerButton">
<h:commandLink id="visualizzalink" action="#{creaViaggio.addIstanzaTmp2()}">
<div class="button" id="register">
Riepilogo
</div>
</h:commandLink>
</div>

				</div>
				</div>
  		
  	</h:form>
    

</div>
</div>
<div id="push">
</div>
</div>

<div id="footer">
<h:button id="homepage" value="Homepage" outcome="index.xhtml"></h:button>
</div>

</h:body>

    
</html>